//
//  RGoodViewCell.m
//  EPAa
//
//  Created by lanou3g on 16/4/23.
//  Copyright © 2016年 李日青. All rights reserved.
//

#import "RGoodViewCell.h"
#import "UIImageView+WebCache.h"
#import "RtaobaoController.h"
@interface RGoodViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *titleImage;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIButton *webButton;

@end
@implementation RGoodViewCell

- (void)layoutSubviews {
    [self.titleImage sd_setImageWithURL:[NSURL URLWithString:self.model.coverimg]];
    self.titleLabel.text = self.model.title;
    [self.webButton setTitle:self.model.buyurl forState:UIControlStateNormal];
    
}
- (IBAction)didClickDetailButton:(id)sender {
//    RtaobaoController *taobaoVC = [RtaobaoController new];
    if ([self.goodDelge respondsToSelector:@selector(didDataChengValue:)]) {
        [self.goodDelge didDataChengValue:self.model.buyurl];
    }
    NSLog(@"111");

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
